﻿Module Util

    Function IsValidDoubleValue(v As Object, furtherCheck As Func(Of Double, Boolean)) As Boolean
        If Not TypeOf v Is Double Then Return False
        Dim d = DirectCast(v, Double)
        Return Not Double.IsNaN(d) AndAlso Not Double.IsInfinity(d) AndAlso furtherCheck(d)
    End Function

End Module
